package zy;

/*
 *@Student 张策
 */
public class Dish {
    int id;
    String name;
    double price;
    String desc;
    int stock;

    public Dish(int id, String name, double price, String desc,int stock) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.desc=desc;
        this.stock = stock;
    }

    public Dish(String name, double price, String desc) {
        this.name = name;
        this.price = price;
        this.desc = desc;
        this.stock=0;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getStock() {
        return stock;
    }

    public void setStock(int stock) {
        this.stock = stock;
    }

    @Override
    public String toString() {
        return
                "id:" + id +
                ", 菜名:'" + name + '\'' +
                "菜价:" + price +
                ", 描述:'" + desc + '\'' +
                ", 库存:" + stock
                ;
    }
}
